var currentIndex=1;
var pageSize=10;
var canAj=true;
var noticdelid;
var allids;
//页面已经加载//新消息已经看过
$.cookie("mynotic","loaded");
//返回
$(".mweb_modal_back_button").click(function(){location.href="setpage.html";});

    //跳转
if($.cookie("noticdelid")==="yes"&&!/fromchatpage/.test(location.referrer)){  //第二次进入
    $("#waiting").css("display","none");
    $("#nonews").css("display","block");
    $("#listplace").css("display","none");
    location.href="setpage.html"
}

function gotourl(e){
    var pcUrl=true;
    var errorUrl=/环球网|1905电影网|中国会计视野|编织人生网|IT之家|优姿美女/;
    if(e.dataset.sitename){if(errorUrl.test(e.dataset.sitename)){pcUrl=false;}}
    if(e.dataset.url){
        if(pcUrl){location.href=e.dataset.url;}
        else{location.href="http://www.pulu.com/weixin/"+e.dataset.url;}
    }
}
function stophref(){
    var e=arguments.callee.caller.arguments[0]||event;
    if ( e && e.stopPropagation ) {e.stopPropagation();} else {window.event.cancelBubble = true;}
}
//展示加载图片
function showloadimg(e){$(e).fadeIn();}
function usergohref(e){
    //取消冒泡
    var even=arguments.callee.caller.arguments[0]||event;
    if (even && even.stopPropagation) {even.stopPropagation();} else if (window.event) {window.event.cancelBubble = true;}
    if($.cookie("MYID")){
        var hidereg=new RegExp("匿名");
        if(!hidereg.test(e.innerHTML)){
            var sendid="?otherid="+e.dataset.uid;
            if(!is_weixn()){sendid="?id="+$.cookie("MYID")+"&otherid="+e.dataset.uid;}
            location.href="otherpeoplepage.html"+sendid;
        }
    }
}
//加载数据
function aj(){
    canAj=false;
    $.ajax({
        type:"get",
        url:getanswernoticeurl+id,
        datatype:"json",
        success:function(d){
            if(d.Data.noticeInfos&& d.Data.noticeInfos.length>0){
                if(d.Data.noticeInfos.length<pageSize){
                    $("#waiting").css("display","none");
                    $("#nonews").css("display","block");
                }
                allids= d.Data.noticeids;
                //页面加载数据
                var num=0;
                for(var i=0;i<d.Data.noticeInfos.length;i++){
                    num++;
                    var realName="";
                    if(d.Data.noticeInfos[i].realName){realName=" ("+d.Data.noticeInfos[i].realName+")";}
                    if(d.Data.noticeInfos[i].usernick){unick=d.Data.noticeInfos[i].usernick+realName;}
                    //头像有没有-----------------------
                    var headimg="<img src='img/af8.png'/>";
                    if(d.Data.noticeInfos[i].userHeadImg){
                        if(d.Data.noticeInfos[i].isAnswerHideName===0){
                            headimg="<a href='otherpeoplepage.html?otherid="+d.Data.noticeInfos[i].userId+"'><img src='"+imgurl+d.Data.noticeInfos[i].userHeadImg+"' onload='showloadimg(this)' style='display:none;'/></a>";
                        }else{
                            headimg="<a onclick='stophref()'><img src='img/af8.png'/></a>";
                            unick="匿名";
                        }
                    }else{
                        if(d.Data.noticeInfos[i].isAnswerHideName===0){
                            headimg="<a href='otherpeoplepage.html?otherid="+d.Data.noticeInfos[i].userId+"'><img src='img/af8.png'/></a>";
                        }else{
                            headimg="<a onclick='stophref()'><img src='img/af8.png'/></a>";
                            unick="匿名";
                        }
                    }
                    //有没有图片
                    var fromplace;
                    if(d.Data.noticeInfos[i].qtitle){fromplace=codetoface(d.Data.noticeInfos[i].qtitle);}
                    if(d.Data.noticeInfos[i].qimg){
                        if(d.Data.noticeInfos[i].qtype==1){
                            fromplace="<img src='"+d.Data.noticeInfos[i].qimg+"' onload='showloadimg(this)' style='display:none;'/>"
                        }else{
                            fromplace="<img src='"+imgurl+d.Data.noticeInfos[i].qimg+"' onload='showloadimg(this)' style='display:none;'/>"
                        }
                    }
                    //时间
                    var tim=getDateDiff(getDateTimeStamp(d.Data.noticeInfos[i].time));
                    if(!tim){tim="刚刚";}
                    //sitename
                    var datasitname="";
                    if(d.Data.noticeInfos[i].sitename){datasitname=" data-sitename='"+d.Data.noticeInfos[i].sitename+"'";}
                    //问题经验
                    // 拒绝
                    var tourl=""; //跳转地址
                    var notieword="";
                    if(d.Data.noticeInfos[i].qtype===2){//问题
                        notieword="<span style='color:#333;'> 回答了悬赏</span>";
                        tourl="questiondetail.html?qid="+d.Data.noticeInfos[i].qid+"#fromuser="+id;
                    }
                    else if(d.Data.noticeInfos[i].qtype!=1&&d.Data.noticeInfos[i].qtype!=2&&d.Data.noticeInfos[i].type!==36&&d.Data.noticeInfos[i].type!==35){//经验 不是投诉删除
                        var typename="经验";
                        if(d.Data.noticeInfos[i].qtype==4){typename="单身资源"}
                        else if(d.Data.noticeInfos[i].qtype==8){typename="项目资源"}
                        else if(d.Data.noticeInfos[i].qtype==10){typename="其他资源"}
                        tourl="shareexppage.html?eid="+d.Data.noticeInfos[i].qid+"#fromuser="+id;
                        notieword="<span style='color:#333;'> 评论了"+typename+"</span>";
                    }
                    else if(d.Data.noticeInfos[i].qtype===1){//资讯
                        tourl="newsdetail.html?newsid="+d.Data.noticeInfos[i].qid+"#fromuser="+id+"#newsShareId="+d.Data.noticeInfos[i].shareId;
                        notieword="<span style='color:#333;'> 评论了资讯</span>";
                    }
//----------------（点赞）
                    if(d.Data.noticeInfos[i].type===1){
                        var zanword="";
                        if(d.Data.noticeInfos[i].qtype===2){//问题
                            zanword="点赞了悬赏";
                        }
                        else if(d.Data.noticeInfos[i].qtype===1){//资讯
                            zanword="点赞了资讯";
                            if(d.Data.noticeInfos[i].qimg){
                                fromplace="<img src='"+d.Data.noticeInfos[i].qimg+"' onload='showloadimg(this)' style='display:none;'/>"
                            }
                            tourl="newsdetail.html?newsid="+d.Data.noticeInfos[i].qid+"#fromuser="+id;
                        }else{//经验
                            var typename="经验";
                            if(d.Data.noticeInfos[i].qtype==4){typename="单身资源"}
                            else if(d.Data.noticeInfos[i].qtype==8){typename="项目资源"}
                            else if(d.Data.noticeInfos[i].qtype==10){typename="其他资源"}
                            zanword="点赞了"+typename;
                        }
                        var realName="";
                        if(d.Data.noticeInfos[i].realName){realName=" ("+d.Data.noticeInfos[i].realName+")";}
                        $("#listplace").append("<div class='listbox' data-id='"+d.Data.noticeInfos[i].noticeid+"'"+datasitname+" data-url='"+tourl+"' onclick='gotourl(this)'><div class='headerimg lf'>"+headimg+"</div><div class='wordplace'><div class='nick' onclick='usergohref(this)' data-uid='"+d.Data.noticeInfos[i].userId+"'>"+d.Data.noticeInfos[i].usernick+realName+"</div><div class='say'>"+zanword+"</div><div class='time'>"+tim+"</div></div><div class='fromplace rt'>"+fromplace+"</div></div>");
                    }
//------------------（评论）
                    else if((d.Data.noticeInfos[i].type===2
                        ||d.Data.noticeInfos[i].type===16
                        ||d.Data.noticeInfos[i].type===18
                        ||d.Data.noticeInfos[i].type===19)
                        &&d.Data.noticeInfos[i].qtitle){
                        var userword="";
                        if(d.Data.noticeInfos[i].userwords){userword="<div class='say'>"+codetoface(d.Data.noticeInfos[i].userwords)+"</div>"}
                        if(d.Data.noticeInfos[i].type===18||d.Data.noticeInfos[i].type===19){notieword="<span style='color:#333;'> 回复了你</span>";}
                        var headimg="<a href='otherpeoplepage.html?otherid="+d.Data.noticeInfos[i].userId+"'><img src='img/af8.png'/></a>";
                        var realName="";
                        if(d.Data.noticeInfos[i].realName){realName=" ("+d.Data.noticeInfos[i].realName+")";}
                        var unick=d.Data.noticeInfos[i].usernick+realName;
                        if(d.Data.noticeInfos[i].userHeadImg){
                            if(d.Data.noticeInfos[i].isAnswerHideName===0){
                                headimg="<a href='otherpeoplepage.html?otherid="+d.Data.noticeInfos[i].userId+"'><img src='"+imgurl+d.Data.noticeInfos[i].userHeadImg+"' onload='showloadimg(this)' style='display:none;'/></a>";
                            }else{
                                headimg="<a onclick='stophref()'><img src='img/af8.png'/></a>";
                                unick="匿名";
                            }
                        }else{
                            if(d.Data.noticeInfos[i].isAnswerHideName===0){
                                headimg="<a href='otherpeoplepage.html?otherid="+d.Data.noticeInfos[i].userId+"'><img src='img/af8.png'/></a>";
                            }else{
                                headimg="<a onclick='stophref()'><img src='img/af8.png'/></a>";
                                unick="匿名";
                            }
                        }
                        $("#listplace").append("<div class='listbox' data-id='"+d.Data.noticeInfos[i].noticeid+"'"+datasitname+" data-url='"+tourl+"' onclick='gotourl(this)'><div class='headerimg lf'>"+headimg+"</div><div class='wordplace'><div class='nick' onclick='usergohref(this)' data-uid='"+d.Data.noticeInfos[i].userId+"'>"+unick+notieword+"</div>"+userword+"<div class='time'>"+tim+"</div></div><div class='fromplace rt'>"+fromplace+"</div></div>");
                    }
//------------------
                    else if((d.Data.noticeInfos[i].type===3 //（选为最佳答案）
                        ||d.Data.noticeInfos[i].type===5 //（20天）
                        ||d.Data.noticeInfos[i].type===6 //（自动结帖）
                        ||d.Data.noticeInfos[i].type===7 //(经验过期)
                        ||d.Data.noticeInfos[i].type===10 //(为选为最佳)
                        ||d.Data.noticeInfos[i].type===11||d.Data.noticeInfos[i].type===12 //(别人问题变为经验)
                        ||d.Data.noticeInfos[i].type===14 //(高额转普通)
                        )&&d.Data.noticeInfos[i].userwords){//20天
                        $("#listplace").append("<div class='listbox' data-id='"+d.Data.noticeInfos[i].noticeid+"' data-url='"+tourl+"' onclick='gotourl(this)'><div class='headerimg lf'><img src='img/logo.png'/></div><div class='wordplace'><div class='sayall'>"+codetoface(d.Data.noticeInfos[i].userwords)+"</div><div class='time'>"+tim+"</div></div><div class='fromplace rt'>"+fromplace+"</div></div>");
                    }
//------------------（他人付费经验 领取红包）
                    else if((d.Data.noticeInfos[i].type===4||d.Data.noticeInfos[i].type===9||d.Data.noticeInfos[i].type===40)&&d.Data.noticeInfos[i].userwords){
                        var headimg="<a href='otherpeoplepage.html?otherid="+d.Data.noticeInfos[i].userId+"'><img src='img/af8.png'/></a>";
                        var realName="";
                        if(d.Data.noticeInfos[i].realName){realName=" ("+d.Data.noticeInfos[i].realName+")";}
                        var unick=d.Data.noticeInfos[i].usernick+realName;
                        if(d.Data.noticeInfos[i].userHeadImg){
                            if(d.Data.noticeInfos[i].isAnswerHideName===0){headimg="<a href='otherpeoplepage.html?otherid="+d.Data.noticeInfos[i].userId+"'><img src='"+imgurl+d.Data.noticeInfos[i].userHeadImg+"' onload='showloadimg(this)' style='display:none;'/></a>";}
                            else{headimg="<a onclick='stophref()'><img src='img/af8.png'/></a>";unick="匿名";}
                        }else{
                            if(d.Data.noticeInfos[i].isAnswerHideName===0){headimg="<a href='otherpeoplepage.html?otherid="+d.Data.noticeInfos[i].userId+"'><img src='img/af8.png'/></a>";}
                            else{headimg="<a onclick='stophref()'><img src='img/af8.png'/></a>";unick="匿名";}
                        }
                        var sayclass="say";
                        if(d.Data.noticeInfos[i].type===9){sayclass="sayall";}
                        $("#listplace").append("<div class='listbox' data-id='"+d.Data.noticeInfos[i].noticeid+"' data-url='"+tourl+"' onclick='gotourl(this)'><div class='headerimg lf'>"+headimg+"</div><div class='wordplace'><div class='nick' onclick='usergohref(this)' data-uid='"+d.Data.noticeInfos[i].userId+"'>"+unick+"</div><div class='"+sayclass+"'>"+codetoface(d.Data.noticeInfos[i].userwords)+"</div><div class='time'>"+tim+"</div></div><div class='fromplace rt'>"+fromplace+"</div></div>");
                    }
//-------------------(转发)
                    else if(d.Data.noticeInfos[i].type===8&&d.Data.noticeInfos[i].userwords){
                        $("#listplace").append("<div class='listbox' data-id='"+d.Data.noticeInfos[i].noticeid+"'"+datasitname+" data-url='"+tourl+"' onclick='gotourl(this)'><div class='headerimg lf'><img src='img/logo.png'/></div><div class='wordplace'><div class='sayall'>"+codetoface(d.Data.noticeInfos[i].userwords)+"</div><div class='time'>"+tim+"</div></div><div class='fromplace rt'>"+fromplace+"</div></div>");
                    }
//-------------------(回复点赞)
                    else if(d.Data.noticeInfos[i].type===15&&d.Data.noticeInfos[i].userwords){
                        var headimg="<a href='otherpeoplepage.html?otherid="+d.Data.noticeInfos[i].userId+"'><img src='img/af8.png'/></a>";
                        var realName="";
                        if(d.Data.noticeInfos[i].realName){realName=" ("+d.Data.noticeInfos[i].realName+")";}
                        var unick=d.Data.noticeInfos[i].usernick+realName;
                        if(d.Data.noticeInfos[i].userHeadImg){
                            headimg="<a href='otherpeoplepage.html?otherid="+d.Data.noticeInfos[i].userId+"'><img src='"+imgurl+d.Data.noticeInfos[i].userHeadImg+"' onload='showloadimg(this)' style='display:none;'/></a>";
                        }else{headimg="<a onclick='stophref()'><img src='img/af8.png'/></a>";}
                        $("#listplace").append("<div class='listbox' data-id='"+d.Data.noticeInfos[i].noticeid+"'"+datasitname+" data-url='"+tourl+"' onclick='gotourl(this)'><div class='headerimg lf'>"+headimg+"</div><div class='wordplace'><div class='nick' onclick='usergohref(this)' data-uid='"+d.Data.noticeInfos[i].userId+"'>"+unick+"</div><div class='say'>点赞了你的回复</div><div class='time'>"+tim+"</div></div><div class='fromplace rt'>"+fromplace+"</div></div>");
                    }
//-------------------(问题转经验提醒)
                    else if(d.Data.noticeInfos[i].type===17&&d.Data.noticeInfos[i].userwords){
                        var realName="";
                        if(d.Data.noticeInfos[i].realName){realName=" ("+d.Data.noticeInfos[i].realName+")";}
                        var unick=d.Data.noticeInfos[i].usernick+realName;
                        if(d.Data.noticeInfos[i].userHeadImg){
                            if(d.Data.noticeInfos[i].isAnswerHideName===0){
                                headimg="<a href='otherpeoplepage.html?otherid="+d.Data.noticeInfos[i].userId+"'><img src='"+imgurl+d.Data.noticeInfos[i].userHeadImg+"' onload='showloadimg(this)' style='display:none;'/></a>";
                            }else{
                                headimg="<a onclick='stophref()'><img src='img/af8.png'/></a>";
                                unick="匿名";
                            }
                        }else{
                            if(d.Data.noticeInfos[i].isAnswerHideName===0){
                                headimg="<a href='otherpeoplepage.html?otherid="+d.Data.noticeInfos[i].userId+"'><img src='img/af8.png'/></a>";
                            }else{
                                headimg="<a onclick='stophref()'><img src='img/af8.png'/></a>";
                                unick="匿名";
                            }
                        }
                        $("#listplace").append("<div class='listbox' data-id='"+d.Data.noticeInfos[i].noticeid+"' data-url='"+tourl+"' onclick='gotourl(this)'><div class='headerimg lf'>"+headimg+"</div><div class='wordplace'><div class='nick' onclick='usergohref(this)' data-uid='"+d.Data.noticeInfos[i].userId+"'>"+unick+"</div><div class='say'>"+codetoface(d.Data.noticeInfos[i].userwords)+"</div><div class='time'>"+tim+"</div></div><div class='fromplace rt'>"+fromplace+"</div></div>");
                    }
//-------------------(召唤)
                    else if((d.Data.noticeInfos[i].type===22||d.Data.noticeInfos[i].type===13)&&d.Data.noticeInfos[i].userwords){
                        //资讯
                        if(d.Data.noticeInfos[i].qtype===1){tourl="newsdetail.html?newsid="+d.Data.noticeInfos[i].qid+"#fromuser="+id;}
                        if(d.Data.noticeInfos[i].userHeadImg){
                            var realName="";
                            if(d.Data.noticeInfos[i].realName){realName=" ("+d.Data.noticeInfos[i].realName+")";}
                            if(d.Data.noticeInfos[i].usernick){unick=d.Data.noticeInfos[i].usernick+realName;}
                            if(d.Data.noticeInfos[i].isAnswerHideName===0){
                                headimg="<a href='otherpeoplepage.html?otherid="+d.Data.noticeInfos[i].userId+"'><img src='"+imgurl+d.Data.noticeInfos[i].userHeadImg+"' onload='showloadimg(this)' style='display:none;'/></a>";
                            }else{
                                headimg="<a onclick='stophref()'><img src='img/af8.png'/></a>";
                                unick="匿名";
                            }
                        }else{
                            if(d.Data.noticeInfos[i].usernick){unick=d.Data.noticeInfos[i].usernick;}
                            if(d.Data.noticeInfos[i].isAnswerHideName===0){
                                headimg="<a href='otherpeoplepage.html?otherid="+d.Data.noticeInfos[i].userId+"'><img src='img/af8.png'/></a>";
                            }else{
                                headimg="<a onclick='stophref()'><img src='img/af8.png'/></a>";
                                unick="匿名";
                            }
                        }
                        $("#listplace").append("<div class='listbox' data-id='"+d.Data.noticeInfos[i].noticeid+"'"+datasitname+" data-url='"+tourl+"' onclick='gotourl(this)'><div class='headerimg lf'>"+headimg+"</div><div class='wordplace'><div class='nick' onclick='usergohref(this)' data-uid='"+d.Data.noticeInfos[i].userId+"'>"+unick+"</div><div class='say'>"+codetoface(d.Data.noticeInfos[i].userwords)+"</div><div class='time'>"+tim+"</div></div><div class='fromplace rt'>"+fromplace+"</div></div>");
                    }
//-------------------(充值) 28要好友获赠5元 发经验赠钱
                    else if((d.Data.noticeInfos[i].type===23||d.Data.noticeInfos[i].type===28||d.Data.noticeInfos[i].type===29)&&d.Data.noticeInfos[i].userwords){
                        $("#listplace").append("<div class='listbox'><div class='headerimg lf'><img src='img/logo.png'/></div><div class='wordplace noright'><div class='sayall'>"+d.Data.noticeInfos[i].userwords+"</div><div class='time'>"+tim+"</div></div></div>");
                    }
//-------------------(提现)
                    else if(d.Data.noticeInfos[i].type===24&&d.Data.noticeInfos[i].userwords){
                        $("#listplace").append("<div class='listbox'><div class='headerimg lf'><img src='img/logo.png'/></div><div class='wordplace'><div class='sayall'>"+d.Data.noticeInfos[i].userwords+"</div><div class='time'>"+tim+"</div></div></div>");
                    }
//-------------------(加好友)
                    else if((d.Data.noticeInfos[i].type===30)&&d.Data.noticeInfos[i].userwords){
                        var realName="";
                        if(d.Data.noticeInfos[i].realName){realName=" ("+d.Data.noticeInfos[i].realName+")";}
                        $("#listplace").append("<div class='listbox' data-id='"+d.Data.noticeInfos[i].noticeid+"' data-url='chatingonepeople.html?otherid="+d.Data.noticeInfos[i].userId+"' onclick='gotourl(this)'><div class='headerimg lf'>"+headimg+"</div><div class='wordplace noright'><div class='nick'>"+d.Data.noticeInfos[i].usernick+realName+"</div><div class='allsay'>"+codetoface(d.Data.noticeInfos[i].userwords)+"</div><div class='time'>"+tim+"</div></div><div class='fromplace rt' style='width:1px;background: transparent'></div></div>");
                    }
//-------------------(未通过)
                    else if(d.Data.noticeInfos[i].type===34&&d.Data.noticeInfos[i].userwords){
                        $("#listplace").append("<div class='listbox' data-id='"+d.Data.noticeInfos[i].noticeid+"' data-url='"+tourl+"'><div class='headerimg lf'><img src='img/logo.png'/></div><div class='wordplace noright'><div class='sayall'>"+d.Data.noticeInfos[i].userwords+"</div><div class='time'>"+tim+"</div></div></div>");
                    }
                    else if(d.Data.noticeInfos[i].userwords){
                        if(d.Data.noticeInfos[i].type===38){
                            tourl="chatpage.html#showFriend";
                        }else if(d.Data.noticeInfos[i].type===31){ //(问题修改)
                            tourl="questiondetail.html?qid="+d.Data.noticeInfos[i].qid+"#fromuser="+id;
                        }else if(d.Data.noticeInfos[i].type===32){ //(发经验给钱)
                            tourl="shareexppage.html?eid="+d.Data.noticeInfos[i].qid+"#fromuser="+id;
                        }else if(d.Data.noticeInfos[i].type===44){//(认证通过)
                            tourl="scoredetail.html";
                        }else if(d.Data.noticeInfos[i].type===45){//(认证未通过)
                            tourl="scoredetail.html";
                        }else if(d.Data.noticeInfos[i].type===46){
                            tourl="otherpeoplepage.html?otherid="+d.Data.noticeInfos[i].userId;
                        }else if(d.Data.noticeInfos[i].type===47){
                            tourl="otherpeoplepage.html?otherid="+d.Data.noticeInfos[i].userId;
                        }else if(d.Data.noticeInfos[i].type===48){
                            if(d.Data.noticeInfos[i].qtype===3){
                                tourl="shareexppage.html?eid="+d.Data.noticeInfos[i].qid+"#fromuser="+id;
                            }else if(d.Data.noticeInfos[i].qtype===2){
                                tourl="questiondetail.html?qid="+d.Data.noticeInfos[i].qid+"#fromuser="+id;
                            }
                        }
                        $("#listplace").append("<div class='listbox' data-id='"+d.Data.noticeInfos[i].noticeid+"' data-url='"+tourl+"' onclick='gotourl(this)'><div class='headerimg lf'><img src='img/logo.png'/></div><div class='wordplace noright'><div class='sayall'>"+d.Data.noticeInfos[i].userwords+"</div><div class='time'>"+tim+"</div></div></div>");
                    }
                };
                canAj=true;
                $.ajax({
                    type:"post",
                    datatype:"json",
                    url:delanswernoticurl,
                    data:{"userId":id,"keepflag":1},
                    success:function(d){}
                });
            }
            //没有数据
            else{
                $("#waiting").css("display","none");
                $("#nonews").css("display","block");
            }
        }
    });
};
aj();
//滚动加载
$(window).scroll(function(){
    var mainheight=$("#mainpage").height();
    var windowheight=$(window).height();
    var chajuli=$("#mainpage").offset().top - $(window).scrollTop();
    var cz=windowheight-mainheight+5;
    if(canAj){
        currentIndex++;
        aj();
    }
});
//清空数据
$("#clearbtn").click(function(){
    if(allids){
        $(".listbox").remove();
        $.ajax({
            type:"post",
            datatype:"json",
            url:delanswernoticurl,
            data:{"userId":id,"keepflag":1},
            success:function(d){
                $("#waiting").css("display","none");
                $("#nonews").css("display","block");
            }
        });
    }
});
$("#clearbtn").click(function(){$("#delmynews").css("display","block");});
$("#delmynewscancel").click(function(){$("#delmynews").css("display","none");});
$("#delmynewsok").click(function(){
    if(allids){
        $(".listbox").remove();
        $.ajax({
            type:"post",
            datatype:"json",
            url:delanswernoticurl,
            data:{"userId":id,"keepflag":1},
            success:function(d){
                $("#waiting").css("display","none");
                $("#nonews").css("display","block");
                $("#delmynews").css("display","none");
            }
        });
    }else{
        $("#delmynews").css("display","none");
    }
});
$("#nonews").click(function(){location.href="mynotichistory.html#fromchatpage=0";});